<?php
include 'source/define.php';
include ROOT_PATH . 'source/mysql_connect.php';
$TITLE = "Прайс-лист &bull; " . $TITLE;
    $pricelist = mysql_select_array("SELECT * FROM `price` ORDER BY `title` ASC");
    foreach ($pricelist as $key => $value) {
        if(!mysql_value("SELECT `active` FROM `product` WHERE `id`=?", $value['related_product'])){
            unset($pricelist[$key]);
        }
    }


include ROOT_PATH . "templates/header.php";
include ROOT_PATH . "templates/price.php";
include ROOT_PATH . "templates/footer.php";